from datetime import datetime
import uuid
from pydantic import BaseModel as PydanticBaseModel, ConfigDict

class BaseModel(PydanticBaseModel):
    """基础模型类，所有其他模型都应该继承这个类"""
    model_config = ConfigDict(
        protected_namespaces=(),  # 禁用保护命名空间，解决 model_id 字段的警告
    )

    @staticmethod
    def generate_id():
        return str(uuid.uuid4())
    
    @staticmethod
    def get_current_timestamp():
        return datetime.now().isoformat() 